﻿using System;
using System.Configuration;
using System.Data;
using System.Collections.Generic;
using KPIS.GERP.ESS.MODEL;
using KPIS.DBM;

namespace KPIS.GERP.ESS.MODEL
{
    public static class SystemInfo
    {
        private static string connectionString = ConfigurationSettings.AppSettings["ConnectionString"];

        private static DataProvider provider = DataProvider.SqlServer;

        private static string deleteRecordStatus = "D"; // ลบ (master, transection)
        private static string processRecordStatus = "P"; // ยืนยันรายการแล้ว รออนุมัติ (transection)
        private static string approveRecordStatus = "A"; // อนุมัติแล้ว (transection)
        private static string workRecordStatus = "W"; // รายการใหม่ ยังไม่ได้ยืนยันรายการ (transection)
        private static string cancelRecordStatus = "C"; // ยกเลิกรายการ (transection)
        private static string activeRecordStatus = "U"; // ใช้งานอยู่ (master)
        private static string disapproveRecordStatus = "E"; // ไม่อนุมัติ (master)

        private static string unread = "0"; // ยังไม่อ่าน
        private static string read = "1"; // อ่านแล้ว
        private static string reply = "2"; // ตอบแล้ววว

        private static string imagePath = "../Image/ItemPicture/";
        private static string emptyImage = "../Image/ItemPicture/Nopic.jpg";
        private static string insertComplete = "บันทึกข้อมูลเรียบร้อยแล้ว";
        private static string insertError = "เกิดข้อผิดพลาดในการบันทึกข้อมูล";
        private static string deleteError = "เกิดข้อผิดพลาดในการลบข้อมูล";
        private static string deleteNull = "โปรดเลือกรายการที่ต้องการลบ";
        private static string restoreError = "เกิดข้อผิดพลาดในการกู้คืนข้อมูล";
        private static string restoreNull = "โปรดเลือกรายการที่ต้องการกู้คืน";

        private static string salaryExtSeq1 = "199999";
        private static string taxExtSeq1 = "159999";
        private static string fundExtSeq1 = "140101";

        private static string salaryExtSeq2 = "299999";
        private static string taxExtSeq2 = "259999";
        private static string fundExtSeq2 = "240102";

        private static string salaryExtSeq3 = "399999";
        private static string taxExtSeq3 = "359999";
        private static string fundExtSeq3 = "340101";
        private static int integrateProjectBgmOptionTypeSeq = 3;
        private static string receiveReportType = "1, 2, 3";

        //private static int intProjectRunningNoLength = Convert.ToInt32((ConfigurationSettings.AppSettings["ConnectionString"] != null ? ConfigurationSettings.AppSettings["ConnectionString"] : "3"));

        private static DateTime date_min = Convert.ToDateTime("1001-12-01");
        private static DateTime date_max = Convert.ToDateTime("9999-12-01");


        public static string _ConnectionString
        {
            get
            {
                return connectionString;
            }
        }

        public static int _intProjectRunningNoLength
        {
            get
            {
                return Convert.ToInt32((ConfigurationSettings.AppSettings["ProjectRunningNoLength"] != null ? ConfigurationSettings.AppSettings["ProjectRunningNoLength"] : "3"));
            }
        }

        public static DataProvider _DataProvider
        {
            get
            {
                return provider;
            }
        }

        public static string _DeleteRecordStatus
        {
            get
            {
                return deleteRecordStatus;
            }
        }

        public static string _ProcessRecordStatus
        {
            get
            {
                return processRecordStatus;
            }
        }

        public static string _ApproveRecordStatus
        {
            get
            {
                return approveRecordStatus;
            }
        }

        public static string _CancelRecordStatus
        {
            get
            {
                return cancelRecordStatus;
            }
        }
        public static string _DisApproveRecordStatus
        {
            get
            {
                return disapproveRecordStatus;
            }
        }
        public static string _WorkRecordStatus
        {
            get
            {
                return workRecordStatus;
            }
        }

        public static string _ActiveRecordStatus
        {
            get
            {
                return activeRecordStatus;
            }
        }
        public static string _UnreadMessage
        {
            get
            {
                return unread;
            }
        }
        public static string _ReadMessage
        {
            get
            {
                return read;
            }
        }
        public static string _ReplyMessage
        {
            get
            {
                return reply;
            }
        }

        public static string _ImagePath
        {
            get
            {
                return imagePath;
            }
        }

        public static string _EmptyImage
        {
            get
            {
                return emptyImage;
            }
        }

        public static string _InsertComplete
        {
            get
            {
                return insertComplete;
            }
        }

        public static string _InsertError
        {
            get
            {
                return insertError;
            }
        }

        public static string _DeleteError
        {
            get
            {
                return deleteError;
            }
        }

        public static string _DeleteNull
        {
            get
            {
                return deleteNull;
            }
        }

        public static string _RestoreError
        {
            get
            {
                return restoreError;
            }
        }

        public static string _RestoreNull
        {
            get
            {
                return restoreNull;
            }
        }

        public static string _SalaryExtSeq1
        {
            get
            {
                return salaryExtSeq1;
            }
        }

        public static string _TaxExtSeq1
        {
            get
            {
                return taxExtSeq1;
            }
        }

        public static string _FundExtSeq1
        {
            get
            {
                return fundExtSeq1;
            }
        }

        public static string _SalaryExtSeq2
        {
            get
            {
                return salaryExtSeq2;
            }
        }

        public static string _TaxExtSeq2
        {
            get
            {
                return taxExtSeq2;
            }
        }

        public static string _FundExtSeq2
        {
            get
            {
                return fundExtSeq2;
            }
        }

        public static string _SalaryExtSeq3
        {
            get
            {
                return salaryExtSeq3;
            }
        }

        public static string _TaxExtSeq3
        {
            get
            {
                return taxExtSeq3;
            }
        }

        public static string _FundExtSeq3
        {
            get
            {
                return fundExtSeq3;
            }
        }

        public static int _IntegrateProjectBgmOptionTypeSeq
        {
            get
            {
                return integrateProjectBgmOptionTypeSeq;
            }
        }

        public static string _ReceiveReportType
        {
            get
            {
                return receiveReportType;
            }
        }
        public static DateTime _DefaultDateStart
        {
            get
            {
                return date_min;
            }
        }
        public static DateTime _DefaultDateEnd
        {
            get
            {
                return date_max;
            }
        }
    }
}
